#ifndef _COMMON_LIBRARY_H
#define _COMMON_LIBRARY_H

#include "common_libs.h"

// library query defines are in [201;300]
#define QUERY_ID		201
#define QUERY_FSTRUCT	202

struct sLibProc {   // a library processus
	sLibrary *parent;
	sLibProc *prev;
	sLibProc *next;

	void *data;

	int		(*_init)	(sLibs *_libs);
	u32		(*query)	(u32 query);
	void	(*_deinit)	();
};

struct sLibrary {	// the information of the library
	sLibProc *procs;	// points to the latest library process

	u32 id;
	sEL exts;
	char name[128];
};

struct sLibResult { // the result of a search
    sLibrary *lib;
    sFile *file;
    u8 extid;
};

#endif

